<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{$lang.home}{if $ur_here} - {$ur_here} {/if}</title>
<meta name="Copyright" content="Douco Design." />
<link href="templates/public.css" rel="stylesheet" type="text/css">
{include file="javascript.htm"}
</head>
<body>
<div id="dcWrap">
 {include file="header.htm"}
 <div id="dcLeft">{include file="menu.htm"}</div>
 <div id="dcMain">
   {include file="ur_here.htm"}
   <div id="user" class="mainBox" style="{$workspace.height}">
    <h3><a href="{$userlist_link.href}" class="actionBtn">{$userlist_link.text}</a> <!-- <a href="user.php?rec=config" class="actionBtn">其他设置</a> --> {$ur_here}</h3>

    <!-- {if $rec eq 'default'} 会员列表 -->
    <div class="filter">
      <form action="user.php" method="post">
        <input name="username" class="inpMain" placeholder="输入用户名" value="" size="20" type="text">
        <input name="mobile" class="inpMain" placeholder="手机号" value="" size="20" type="text">
        <select name="group_id">
          <option value="">用户组</option>
          {foreach from=$lang.group_in item=v key=k}
          <option value="{$k}">{$v}</option>
          {/foreach}
        </select>
        <select name="isgag">
          <option value="">禁言</option>
          {foreach from=$lang.yes_no item=v key=k}
          <option value="{$k}">{$v}</option>
          {/foreach}
        </select>
        <select name="status">
          <option value="">状态</option>
          {foreach from=$lang.user_status item=v key=k}
          <option value="{$k}">{$v}</option>
          {/foreach}
        </select>
        <input name="submit" class="btnGray" value="查询" type="submit">
      </form>
    </div>

    <form name="action" method="post" action="user.php?rec=action">
    <div class="action">
     <input name="opt_add_gag" class="btn" type="submit" value="禁言" />
     <input name="opt_add_blacklist" class="btn" type="submit" value="拉黑" />
    </div>
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
     <tr>
      <th width="22" align="center"><input name='chkall' type='checkbox' id='chkall' onclick='selectcheckbox(this.form)' value='check'></th>
      <th width="30" align="left">{$lang.record_id}</th>
      <th align="center">{$lang.avatar}</th>
      <th align="center">{$lang.user_username}</th>
      <th align="center">{$lang.user_nickname}</th>
      <th align="center">{$lang.user_mobile}</th>
      <th align="center">{$lang.group}</th>
      <th align="center">{$lang.loginip}</th>
      <th align="center">{$lang.logintime}</th>
      <th align="center">禁言次数</th>
      <th align="center">禁言操作</th>
      <th align="center">拉黑操作</th>
      <th align="center">IP禁止</th>
      <th>{$lang.handler}</th>
     </tr>
     <!-- {foreach from=$user_list item=user} -->
     <tr>
      <td align="center"><input type="checkbox" name="checkbox[]" value="{$user.id}" /></td>
      <td>{$user.id}</td>
      <td align="center"><img src='{$user.avatar}' width="30" height="30"></td>
      <td align="center">{$user.username}</td>
      <td align="center">{$user.nickname}</td>
      <td align="center">{$user.mobile}</td>
      <td align="center">{$lang.group_in[$user.group_id]}</td>
      <td align="center">{$user.loginip}</td>
      <td align="center">{$user.logintime}</td>
      <td align="center">{$user.gag_time}</td>
      <td align="center">
        {if $user.isgag == '0'}
        <a href="user.php?rec=action&opt=add_gag&checkbox={$user.id}" style="color:green">立即禁言</a>
        {if is_array($user.gag_log)}<br>上次操作员:{$user.gag_log.opt_user} ({$user.gag_log.create_time|date_format:'%Y-%m-%d %H:%M:%S'}){/if}
        {/if}
        {if $user.isgag == '1'}
        <a href="user.php?rec=action&opt=del_gag&checkbox={$user.id}" style="color:blue">解除禁言</a>
        {if is_array($user.gag_log)}<br>已禁言,操作员:{$user.gag_log.opt_user} ({$user.gag_log.create_time|date_format:'%Y-%m-%d %H:%M:%S'}){/if}
        {/if}
      </td>
      <td align="center">
        {if $user.status == 'normal'}
        <a href="user.php?rec=action&opt=add_blacklist&checkbox={$user.id}" style="color:green">加入黑名单</a>
        {if is_array($user.blacklist_log)}<br>上次操作员:{$user.blacklist_log.opt_user} ({$user.blacklist_log.create_time|date_format:'%Y-%m-%d %H:%M:%S'}){/if}
        {/if}
        {if $user.status == 'hidden'}
        <a href="user.php?rec=action&opt=del_blacklist&checkbox={$user.id}" style="color:blue">解除黑名单</a>
        {if is_array($user.blacklist_log)}<br>已拉黑,操作员:{$user.blacklist_log.opt_user} ({$user.blacklist_log.create_time|date_format:'%Y-%m-%d %H:%M:%S'}){/if}
        {/if}
      </td>
      <td align="center">
        {if $user.banip == '0'}<a href="user.php?rec=action&opt=add_banip&checkbox={$user.id}" style="color:green">立即禁止</a>{/if}
        {if $user.banip == '1'}<a href="user.php?rec=action&opt=del_banip&checkbox={$user.id}" style="color:blue">立即恢复</a>{/if}
      </td>
      <td align="center" align="center">
        <a href="chatlog.php?username={$user.username}">{$lang.chatlog}</a> | 
        <a href="user.php?rec=edit&id={$user.id}">{$lang.edit}</a> | 
        <a href="user.php?rec=del&id={$user.id}">{$lang.del}</a>  
     </tr>
     <!-- {/foreach} -->
    </table>
    <div class="action">
     <input name="opt_add_gag" class="btn" type="submit" value="禁言" />
     <input name="opt_add_blacklist" class="btn" type="submit" value="拉黑" />
    </div>
    </form>

    {include file="pager.htm"}
    <!-- {/if} -->
    
    <!-- {if $rec eq 'edit' || $rec eq 'add'} 会员编辑 -->
    <form action="user.php?rec={if $rec eq 'edit'}update{else}insert{/if}" method="post">
     <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
      <tr>
       <td width="100" align="right">{$lang.user_username}</td>
       <td>
        <input type="text" name="username" value="{$user_info.username}" size="40" class="inpMain" disabled="disabled"/>
       </td>
      </tr>
      <tr>
       <td width="100" align="right">{$lang.user_nickname}</td>
       <td><input type="text" name="nickname" value="{$user_info.nickname}" size="40" class="inpMain" disabled="disabled"/></td>
      </tr>
      <tr>
       <td width="100" align="right">{$lang.avatar}</td>
       <td>
        <input type="text" name="avatar" value="{$user_info.avatar}" size="40" class="inpMain" disabled="disabled"/>
        {if $user_info.avatar}<a href="{$user_info.avatar}" target="_blank"><img class="middle" src="{$user_info.avatar}" width="30" height="30"></a>{else}<img src="images/icon_no.png">{/if}
       </td>
      </tr>
      <tr>
       <td width="100" align="right">{$lang.user_mobile}</td>
       <td><input type="text" name="mobile" value="{$user_info.mobile}" size="40" class="inpMain" disabled="disabled"/></td>
      </tr>
      <tr>
       <td width="100" align="right">{$lang.group}</td>
       <td>
         <select name="group_id">
         {foreach from=$lang.group_in item=v key=k}
         <option value="{$k}" {if $k==$user_info.group_id}selected=selected{/if} >{$v}</option>
         {/foreach}
          </select>
       </td>
      </tr>
      <tr>
       <td width="100" align="right">{$lang.isgag}</td>
       <td>
         <select name="isgag">
         {foreach from=$lang.yes_no item=v key=k}
         <option value="{$k}" {if $k==$user_info.isgag}selected=selected{/if} >{$v}</option>
         {/foreach}
          </select>
       </td>
      </tr>
      <tr>
       <td width="100" align="right">{$lang.status}</td>
       <td>
         <select name="status">
         {foreach from=$lang.user_status item=v key=k}
         <option value="{$k}" {if $k==$user_info.status}selected=selected{/if} >{$v}</option>
         {/foreach}
          </select>
       </td>
      </tr>
      <!--
      <tr>
       <td align="right">{$lang.user_new_password}</td>
       <td><input type="password" name="password" size="40" class="inpMain" /></td>
      </tr>
      <tr>
       <td align="right">{$lang.user_new_password_confirm}</td>
       <td><input type="password" name="password_confirm" size="40" class="inpMain" /></td>
      </tr>
      -->
      <tr>
       <td></td>
       <td>
        <input type="hidden" name="token" value="{$token}" />
        <input type="hidden" name="id" value="{$user_info.id}" />
        <input type="submit" name="submit" class="btn" value="{$lang.btn_submit}" />
       </td>
      </tr>
     </table>
    </form>
    <!-- {/if} -->



   </div>
 </div>
 {include file="footer.htm"}
 </div>
</body>
</html>